package com.model;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
/**
 * 网站回复关键字
 * @author Jason
 */
@Entity
public class Keyword {

	private Integer id;
	private String keyword;
	private String token;
	private String model;//模型
	private String type;
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	private Taobao taobao;
	private Img img;
	private VoiceResponse voiceResponse;
	private Photo photo;
	private TextResponse textResponse;
	private Lottery lottery;
	private Vote vote;
	private HotelKTV hotelKTV;
	
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public HotelKTV getHotelKTV() {
		return hotelKTV;
	}
	public void setHotelKTV(HotelKTV hotelKTV) {
		this.hotelKTV = hotelKTV;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public Lottery getLottery() {
		return lottery;
	}
	public void setLottery(Lottery lottery) {
		this.lottery = lottery;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public TextResponse getTextResponse() {
		return textResponse;
	}
	public void setTextResponse(TextResponse textResponse) {
		this.textResponse = textResponse;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public Photo getPhoto() {
		return photo;
	}
	public void setPhoto(Photo photo) {
		this.photo = photo;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public VoiceResponse getVoiceResponse() {
		return voiceResponse;
	}
	public void setVoiceResponse(VoiceResponse voiceResponse) {
		this.voiceResponse = voiceResponse;
	}
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public Img getImg() {
		return img;
	}
	public void setImg(Img img) {
		this.img = img;
	}
	
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public Taobao getTaobao() {
		return taobao;
	}
	public void setTaobao(Taobao taobao) {
		this.taobao = taobao;
	}
	
	@OneToOne(cascade=CascadeType.ALL,fetch=FetchType.EAGER,mappedBy="keyword")
	public Vote getVote() {
		return vote;
	}
	public void setVote(Vote vote) {
		this.vote = vote;
	}
	@Id
	@GeneratedValue
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getKeyword() {
		return keyword;
	}
	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}
	public String getToken() {
		return token;
	}
	public void setToken(String token) {
		this.token = token;
	}
	public String getModel() {
		return model;
	}
	public void setModel(String model) {
		this.model = model;
	}
}
